/**
 * 
 */
package denaris.core.controller;

/**
 * @author stkl23
 *
 */
public class VectorExplosionController extends ExplosionController {
	private int deltaX;
	private int deltaY;
	
	public VectorExplosionController(int x, int y, int dx, int dy) {
		super(x, y);
		deltaX = dx;
		deltaY = dy;
	}
	
	public boolean advance() {
		boolean result = super.advance();
		controllable.move(deltaX, deltaY);
		if (deltaX > 1) {
			deltaX >>= 1;
		}
		if (deltaY > 1) {
			deltaY >>= 1;
		}
		return result;
	}

}
